package com.campusbackend.entity.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import java.util.List;

/**
 * 通知创建VO
 * 
 * @author yezi
 * @since 2025-07-27
 */
@Data
@Schema(name = "NotificationCreateVO", description = "通知创建请求对象")
public class NotificationCreateVO {
    
    @Schema(description = "队伍ID", required = true)
    @NotNull(message = "队伍ID不能为空")
    private Long teamId;
    
    @Schema(description = "通知标题", required = true)
    @NotBlank(message = "通知标题不能为空")
    @Size(max = 200, message = "通知标题长度不能超过200个字符")
    private String title;
    
    @Schema(description = "通知内容", required = true)
    @NotBlank(message = "通知内容不能为空")
    @Size(max = 5000, message = "通知内容长度不能超过5000个字符")
    private String content;
    
    @Schema(description = "图片URL列表")
    private List<String> images;

    @Schema(description = "图片URL列表（兼容字段）")
    private List<String> imageUrls;

    /**
     * 获取图片列表，优先使用images，如果为空则使用imageUrls
     */
    public List<String> getImages() {
        if (images != null && !images.isEmpty()) {
            return images;
        }
        return imageUrls;
    }
    
    @Schema(description = "是否紧急：0-普通，1-紧急", example = "0")
    private Byte isUrgent = 0;
    
    @Schema(description = "是否需要确认：0-不需要，1-需要", example = "0")
    private Byte requireConfirmation = 0;
}
